#!usr/bin/env python  
#@time: 2018/01/19 
import pickle

d = dict(name='Bob', age=20, score=88)
# 序列化
res = pickle.dumps(d)

print(res)

f = open('dump.txt','wb')
pickle.dump(d,f)
f.close()